

kmpkg_from_gitee(
        OUT_SOURCE_PATH SOURCE_PATH
        REPO kumo-pub/kmbind
        REF "v${VERSION}"
        SHA512 e4730905ca2428a96c88d7c921c82e834432e06b3efcd7549936e3ca6bc36de3e062b64c70dcd289238fb41053b0ef05543ac9ed24a2b562861114ef5dfe6314
        HEAD_REF master
)


kmpkg_cmake_configure(
    SOURCE_PATH "${SOURCE_PATH}"
    OPTIONS
        -DKMBIND_TEST=OFF
        # Disable all Python searching, Python required only for tests
        -DKMBIND_NOPYTHON=ON
        -DBUILD_TESTING=OFF
)

kmpkg_cmake_install()
kmpkg_cmake_config_fixup(CONFIG_PATH "share/cmake/kmbind")
kmpkg_fixup_pkgconfig()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/")

file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
kmpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
